package cn.NewsServiceImpl;



import cn.NewsDao.NewsDao4;
import cn.NewsDaoImpl.NewsDaoImpl4;
import cn.NewsService.NewsService4;
import cn.entity.News4;

import java.util.List;

public class NewsServiceImpl4 implements NewsService4 {
    private  NewsDao4 newsDao = new NewsDaoImpl4();

    @Override
    public boolean updateNews(News4 news) {
        return newsDao.update(news);
    }

    @Override
    public boolean addNews(News4 news) {
        return newsDao.add(news);
    }

    @Override
    public boolean deleteNews(int id) {
        return newsDao.delete(id);
    }

    @Override
    public List<News4> getNewsList() {
        return newsDao.getNewsList();
    }
}
